import request from "@/utils/request";

//获取供应商列表
export function getSupplierList(query) {
  return request({
    url: "/enterprise/list",
    method: "get",
    params: query,
  });
}
//新增供应商
export function addSupplier(data) {
  return request({
    url: "/enterprise",
    method: "post",
    data: data,
  });
}
//删除供应商
export function deleteSupplier(id) {
  return request({
    url: "/enterprise/" + id,
    method: "delete",
  });
}
//获取供应商详细信息
export function getSupplier(id) {
  return request({
    url: "/enterprise/" + id,
    method: "get",
  });
}
//编辑供应商
export function editSupplier(data) {
  return request({
    url: "/enterprise/",
    method: "put",
    data: data,
  });
}
//编辑供应商
export function importSupplier(data) {
  return request({
    url: "/enterprise/import",
    method: "post",
    data: data,
  });
}
